Backport: Add pool join check CP-23026: pool/host must have same "enforced" updates #3106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport from the master branch. The main difference is that we don't
increment the API version because that would make it equal to the API version of
another release. It's also worth noting this commit replaces an existing overly
restrictive check with this new one.
This commit modifies checks before a host can join a pool.
The joining host compares its set of updates with the updates on each
host in the pool. These sets must be equal for the host being able to join
the pool. The comparison only considers updates that are marked as
enforce-homogeneity="true" in their update.xml definition -- see below.
This attribute is new. The absence of the enforce-homogeneity attribute
in an update defaults to enforce-homogeneity=false. This makes the code
backward compatible with updates that don't have this annotation.
Typically, code updates will have enforce-homogeneity=true but driver
updates will have enforce-homogeneity=false such that hosts in the pool
can have different sets of drivers but have the same code updates.
The implementation changes the datamodel: class pool_update gets a new
field enforce_homogeneity. Note: the API version is not incremented
because this would make the API version equal to the one of another
release. We are taking a risk here.
Signed-off-by: Christian Lindig [email protected]